import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class ATHomeVideo{
  int code;
  List<ATVideoCate> data;

  ATHomeVideo({this.code, this.data});
  ATHomeVideo.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    if (json['data'] != null) {
      data = new List<ATVideoCate>();
      json['data'].forEach((v) {
        data.add(new ATVideoCate.fromJson(v));
      });
    }
  }
}


class ATVideoCate{
  String name;
  String id;
  List<ATVideo> vod;
  ATVideoCate({this.name, this.id, this.vod});
  ATVideoCate.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    id = json['id'];
    if (json['vod'] != null) {
      vod = new List<ATVideo>();
      json['vod'].forEach((v) {
        vod.add(new ATVideo.fromJson(v));
      });
    }
  }
}

class ATVideo{
  String name;
  String pic;

  String type;
  String state;

  ATVideo({this.name, this.pic, this.type, this.state});
  ATVideo.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    pic = json['pic'];
    type = json['type'];
    state = json['state'];
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['pic'] = this.pic;
    data['type'] = this.type;
    return data;
  }
}